﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace homewok5_4
{
    class Program
    {
        static void Main(string[] args)
        {
            double number = 0;
            double i = 1;     //定义变量
            do
            {
                number = number + (1/ i)*Math.Pow((-1),(i-1)/2);
                i = i + 2;
            }                //循环体
            while (i < Math.Pow(10, 6)); //条件
            Console.WriteLine(4*number);
            Console.ReadKey();

            

           


        }
    }
}
